package com.project.controller;

import com.project.bean.CountSellBean;
import com.project.service.ICountSellService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;
import java.util.List;

@RestController
@RequestMapping("money")
public class CountSellController {
    @Autowired
    private ICountSellService countSellService;

    @RequestMapping("findByType")
  public   List<CountSellBean> findByType (LocalDate startDate, LocalDate endDate){
    return   countSellService.findByType(startDate,endDate);
  }
    @RequestMapping("findByproduct")
  public   List<CountSellBean> findByproduct(LocalDate startDate,LocalDate endDate){
    return   countSellService.findByproduct(startDate,endDate);
  }
}
